﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace shenghua.Migrations
{
    public partial class addentity41 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<long>(
                name: "DeleterUserId",
                table: "Commodities",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "DeletionTime",
                table: "Commodities",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "IsDeleted",
                table: "Commodities",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<DateTime>(
                name: "LastModificationTime",
                table: "Commodities",
                nullable: true);

            migrationBuilder.AddColumn<long>(
                name: "LastModifierUserId",
                table: "Commodities",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CommodityName",
                table: "CollectionCommodities",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CommodityPicture",
                table: "CollectionCommodities",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ExtensionData",
                table: "CollectionCommodities",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "CommodityPrice_MoneyType",
                table: "CollectionCommodities",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<double>(
                name: "CommodityPrice_Value",
                table: "CollectionCommodities",
                nullable: false,
                defaultValue: 0.0);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "DeleterUserId",
                table: "Commodities");

            migrationBuilder.DropColumn(
                name: "DeletionTime",
                table: "Commodities");

            migrationBuilder.DropColumn(
                name: "IsDeleted",
                table: "Commodities");

            migrationBuilder.DropColumn(
                name: "LastModificationTime",
                table: "Commodities");

            migrationBuilder.DropColumn(
                name: "LastModifierUserId",
                table: "Commodities");

            migrationBuilder.DropColumn(
                name: "CommodityName",
                table: "CollectionCommodities");

            migrationBuilder.DropColumn(
                name: "CommodityPicture",
                table: "CollectionCommodities");

            migrationBuilder.DropColumn(
                name: "ExtensionData",
                table: "CollectionCommodities");

            migrationBuilder.DropColumn(
                name: "CommodityPrice_MoneyType",
                table: "CollectionCommodities");

            migrationBuilder.DropColumn(
                name: "CommodityPrice_Value",
                table: "CollectionCommodities");
        }
    }
}
